Conversation
✅ Deploy Preview for rsbuild ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds documentation for SSR-specific plugin development in both English and Chinese guides, showing how to use Rsbuild and Rspack hooks as well as code transforms for SSR versus client builds.
- Introduces an “SSR-specific plugins” section with examples for
modifyEnvironmentConfig,modifyRspackConfig, andtransform. - Adds parallel content to the Chinese (
zh) and English (en) advanced SSR docs.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| website/docs/zh/guide/advanced/ssr.mdx | Added SSR 插件适配示例,包括 Rsbuild/Rspack 配置和代码转换。 |
| website/docs/en/guide/advanced/ssr.mdx | Added SSR-specific plugin examples for Rsbuild/Rspack and transforms. |
Comments suppressed due to low confidence (6)
website/docs/zh/guide/advanced/ssr.mdx:198
- 请确认
/plugins/dev/hooks#modifyenvironmentconfig的锚点名称与实际文档中的 Heading ID 一致,以避免链接失效。
- 通过 [modifyEnvironmentConfig](/plugins/dev/hooks#modifyenvironmentconfig) 修改 SSR 场景下的 Rsbuild 配置:
website/docs/zh/guide/advanced/ssr.mdx:213
- 请验证
/plugins/dev/hooks#modifyrspackconfig锚点是否与目标文档标题 ID 匹配,确保链接正常跳转。
- 通过 [modifyRspackConfig](/plugins/dev/hooks#modifyrspackconfig) 修改 SSR 场景下的 Rspack 配置:
website/docs/zh/guide/advanced/ssr.mdx:228
- 请检查
/plugins/dev/core#apitransform的锚点是否正确(与transformAPI 部分的 Heading ID 对应),避免用户点击后出现 404。
- 通过 [transform](/plugins/dev/core#apitransform) 为 SSR 和客户端分别进行代码转换:
website/docs/en/guide/advanced/ssr.mdx:198
- Please verify that the
/plugins/dev/hooks#modifyenvironmentconfiganchor matches the actual Heading ID in the hooks documentation to prevent broken links.
- Modify Rsbuild configuration for SSR via [modifyEnvironmentConfig](/plugins/dev/hooks#modifyenvironmentconfig):
website/docs/en/guide/advanced/ssr.mdx:213
- Double-check that the
/plugins/dev/hooks#modifyrspackconfiganchor exists in the hooks reference; mismatches can lead to incorrect navigation.
- Modify Rspack configuration for SSR via [modifyRspackConfig](/plugins/dev/hooks#modifyrspackconfig):
website/docs/en/guide/advanced/ssr.mdx:228
- Ensure that
/plugins/dev/core#apitransformcorresponds exactly to the Heading ID in the core API docs to keep the link functional.
- Transform code for SSR and client separately via [transform](/plugins/dev/core#apitransform):
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Adds documentation for SSR-specific plugin development. The changes provide examples and guidance on how to adapt Rsbuild and Rspack configurations, as well as how to transform code for SSR and client environments.
Checklist